package com.tansuo365.test1.config;

import io.swagger.annotations.ApiModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;

/*国际化解析器 和@Value引入配置*/
@ApiModel(value="MyAppConfig我的应用配置",description="加载外部properties文件,中/英文切换")
@Configuration
public class MyAppConfig {

    //让@Value加载properties中的参数成为可能
    @Bean
    public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
        return new PropertySourcesPlaceholderConfigurer();
    }
}
